projects
/
project
/
bcm63xx
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e7dd4f9
)
linux/kernel.h: Add ALIGN_DOWN macro
author
Masahiro Yamada
<
[email protected]
>
Thu, 21 Dec 2017 04:51:46 +0000
(13:51 +0900)
committer
Tom Rini
<
[email protected]
>
Wed, 10 Jan 2018 13:05:51 +0000
(08:05 -0500)
Follow Linux commit
ed067d4a859f
("linux/kernel.h: Add ALIGN_DOWN
macro").
Signed-off-by: Masahiro Yamada <
[email protected]
>
include/linux/kernel.h
patch
|
blob
|
history
diff --git
a/include/linux/kernel.h
b/include/linux/kernel.h
index 87d2d9554dbb7947aeb9aa61cf9cb437765bdcdd..04a09eb4f6489496417a49db41e5586172753019 100644
(file)
--- a/
include/linux/kernel.h
+++ b/
include/linux/kernel.h
@@
-38,6
+38,7
@@
#define REPEAT_BYTE(x) ((~0ul / 0xff) * (x))
#define ALIGN(x,a) __ALIGN_MASK((x),(typeof(x))(a)-1)
+#define ALIGN_DOWN(x, a) ALIGN((x) - ((a) - 1), (a))
#define __ALIGN_MASK(x,mask) (((x)+(mask))&~(mask))
#define PTR_ALIGN(p, a) ((typeof(p))ALIGN((unsigned long)(p), (a)))
#define IS_ALIGNED(x, a) (((x) & ((typeof(x))(a) - 1)) == 0)